<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh-cmn">
<head>
    <base href="${pageContext.request.contextPath}/">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>医院管理系统</title>
    <link rel="stylesheet" href="statics/css/bootstrap.css">
</head>
<body>
<div class="container">
    <div class="panel panel-info" style="width:50%;margin:150px auto">
        <div class="panel-heading">
            <h3 class="panel-title">用户登录</h3>
        </div>
        <div class="panel-body">
            <form action="login" id="loginForm" class="form-horizontal" method="post">
                <c:if test="${not empty loginErr}">
                    <div class="form-group alert alert-danger">${loginErr}</div>
                </c:if>
                <div class="form-group">
                    <label class="control-label col-md-3 text-right">用户名：</label>
                    <div class="col-md-8">
                        <input type="text" class="form-control" name="name"/>
                    </div>
                </div>

                <div class="form-group">
                    <label class="control-label col-md-3 text-right">密码：</label>
                    <div class="col-md-8">
                        <input type="password" name="pwd" class="form-control">
                    </div>
                </div>
            </form>
        </div>
        <div class="panel-footer text-right">
            <button type="button" class="btn btn-info" onclick="login()">登录</button>
            <button type="button" class="btn btn-default">重置</button>
        </div>
    </div>

</div>

<script type="text/javascript" src="statics/js/jquery-1.12.4.js"></script>
<script type="text/javascript" src="statics/js/bootstrap.js"></script>

<script>
    function login(){
        $("#loginForm").submit();
    }
</script>
</body>
</html>
